#include <gtest/gtest.h>

#include "arena_1dfood.h"

TEST(Arena, 1dfood)
{
  Arena_1dfood *arena = new Arena_1dfood();

  ASSERT_EQ( 10.0, arena->get_distance_to_food() );

  arena->set_speed( 1 );
  arena->update( 1.0 );
  ASSERT_EQ( 9.0, arena->get_distance_to_food() );

  arena->set_speed( 1 );
  arena->update( 1.0 );
  arena->set_speed( 1 );
  arena->update( 1.5 );
  ASSERT_EQ( 8.5, arena->get_distance_to_food() );
}
